home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / dragon.swf / scripts / frame_5 / PlaceObject2_773_646 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2008-09-12  |  947 b   |  47 lines

  1. onClipEvent(enterFrame){
  2.    if(timerMove-- < 0)
  3.    {
  4.       _X = random(740) + 20;
  5.       _Y = random(440) + 20;
  6.       timerMove = 20 + random(100);
  7.    }
  8.    if(timerShoot-- < 0)
  9.    {
  10.       var choice = random(6);
  11.       if(choice == 0)
  12.       {
  13.          _root.game.switchToSnot();
  14.       }
  15.       else if(choice == 1)
  16.       {
  17.          _root.game.switchToGreese();
  18.       }
  19.       else if(choice == 2)
  20.       {
  21.          _root.game.switchToFire();
  22.       }
  23.       else if(choice == 3)
  24.       {
  25.          _root.game.switchToIce();
  26.       }
  27.       else if(choice == 4)
  28.       {
  29.          _root.game.switchToSteel();
  30.          timerDetonate = 50;
  31.       }
  32.       else if(choice == 5)
  33.       {
  34.          _root.game.switchToMeteor();
  35.       }
  36.       _root.game.shoot();
  37.       timerShoot = 50 + random(50);
  38.    }
  39.    if(timerDetonate > 0)
  40.    {
  41.       if(--timerDetonate == 0)
  42.       {
  43.          _root.game.detonateSteel();
  44.       }
  45.    }
  46. }
  47.